from frame.bases.base_admin import BaseAdmin


class MallManage(BaseAdmin):
    """
    定义商品类目
    """

    def create(self, data):

        creat_req = {
            "url": "category/create",
            "method": "post",
            "json": data
        }
        create_r = self.send_api(creat_req)
        return create_r.json()

    def delete(self, data):

        delete_req = {
            "url": "category/delete",
            "method": "post",
            "json": data
        }
        delete_r = self.send_api(delete_req)
        return delete_r.json()
